package com.addedstuff;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;


public class Excaliber extends ItemSword {
	public Excaliber(int par1, EnumToolMaterial par2EnumToolMaterial) 
	{
		super(par1, par2EnumToolMaterial);
		this.setCreativeTab(CreativeTabs.tabCombat);
		// TODO Auto-generated constructor stub
		
	}
	 
	//this will cause blindness
	public boolean hitEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving)
    {
        par1ItemStack.damageItem(1, par3EntityLiving);
        /*
        this.potionID = par1;
        this.duration = par2;
        this.amplifier = par3;
        this.isAmbient = par4;
        */
        //if ((EntitySkeleton)par2EntityLiving  != null)
        //{
        //      par2EntityLiving.addPotionEffect(new PotionEffect(Potion.heal.id, 5000, 1, false));
        //}
        // if ((EntityZombie)par2EntityLiving != null)
        //{
                //par2EntityLiving.addPotionEffect(new PotionEffect(Potion.heal.id, 5000, 1, false));
        //}
        par2EntityLiving.addPotionEffect(new PotionEffect(Potion.blindness.id, 5000, 1, false));
        return true;
    }
	
	
	public void registerIcons(IconRegister iconReg)
	    {
	        itemIcon = iconReg.registerIcon("BrianmodBase:excaliber.fw");
	    }
	 public int getDamageVsEntity (Entity par1Entity)
	 {
		 return 10;
	 }
}


